<form method="post" action="/biz/template/config/add" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, pageRefresh)">
    <input type="hidden" id="groupId" name="groupId" th:value="${group.id}">
    <input type="hidden" id="cmd5" name="cmd5" value="">
    <input type="hidden" id="uid" name="uid" value="">
    <input type="hidden" id="randomData" name="randomData" value="">
    <div class="ibox no-margins no-padding no-borders">
        <div class="ibox-title p-xs ljFixBoxTitle">
            <div class="btn btn-sm btn-primary pull-right" id="btnAddSubmit"><i class="fa fa-paste">添加模板配置表</i></div>
        </div>
        <div style="height:40px;"></div>
        <div class="ibox-content">
            <div class="row">
                <div class="form-group col-md-6"><label>模板名称(<b class="text-danger">*</b>):</label>
                    <input name="name" type="text" placeholder="" class="form-control input-sm required" maxlength="64">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-12"><label>目录名称(<b class="text-danger">*</b>):</label>
                    <input name="folder" type="text" placeholder="" class="form-control input-sm required" maxlength="256">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-12"><label>文件名称(<b class="text-danger">*</b>):</label>
                    <input name="fileName" type="text" placeholder="" class="form-control input-sm required" maxlength="128">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-md-12"><label>模板内容(<b class="text-danger">*</b>):</label>
                    <textarea id="contentCodeMirrorAdd" th:name="content" type="text" class="form-control input-sm required" rows="12"></textarea>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    jQuery(function ($) {
        $(".chosen-select").chosen();
        $("#btnAddSubmit").on("click", function () {
            var values = {};
            modifyVerf(values);
            $("#cmd5").val(values.cmd5);
            $("#uid").val(values.uid);
            $("#randomData").val(values.randomData);
            $(this).closest("form").submit();
        });
        CodeMirror.fromTextArea(document.getElementById("contentCodeMirrorAdd"), {
            mode: "text/x-java",
            lineNumbers: true,
            theme: "dracula",
            lineWrapping: true,
            foldGutter: true,
            gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
            matchBrackets: true,
        });
    });
</script>